package hk.mrtomato.control;

import hk.mrtomato.help.ActionForward;
import hk.mrtomato.model.MrBoardService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class DeleteDateAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		
		ActionForward forward = new ActionForward();
		MrBoardService service = MrBoardService.getInstance();
		String seq = request.getParameter("seq");
		boolean isC = service.deleteDate(seq);
		if(isC) {
			forward.setUrl("calendar");
		}
		return forward;
	}

}
